<?php namespace Zmsun\Stdlib;trait TCalcConstInt{protected function constInVal(array$parts,$const,$constGroupVal,$parentParts=array(),$parentIndex=0,$increVal=0){$func=__FUNCTION__;$maxIndex=count($parts)-1;$parts=array_slice($parts,$parentIndex);foreach($parts as$index=>$item){$currVal=$increVal|$item;if($constGroupVal==$currVal){if($item==$const||in_array($const,$parentParts)){return true;}else{return false;}}if($maxIndex>$index){if($this->$func($parts,$const,$constGroupVal,array_merge($parentParts,[$item]),$index+1,$currVal)){return true;}}}return false;}}?>